package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.shop_design_auth;
import com.ymttest.database.model.godmch.shop_design_authExample;
import com.ymttest.database.model.godmch.shop_design_authKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface shop_design_authMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @SelectProvider(type=shop_design_authSqlProvider.class, method="countByExample")
    int countByExample(shop_design_authExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @DeleteProvider(type=shop_design_authSqlProvider.class, method="deleteByExample")
    int deleteByExample(shop_design_authExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @Delete({
        "delete from shop_design_auth",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and parent_mch_id = #{parent_mch_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(shop_design_authKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @Insert({
        "insert into shop_design_auth (mch_id, parent_mch_id, ",
        "auth_cs_id, auth_state, ",
        "remark, createTime, ",
        "updateTime)",
        "values (#{mch_id,jdbcType=INTEGER}, #{parent_mch_id,jdbcType=INTEGER}, ",
        "#{auth_cs_id,jdbcType=INTEGER}, #{auth_state,jdbcType=INTEGER}, ",
        "#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(shop_design_auth record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @InsertProvider(type=shop_design_authSqlProvider.class, method="insertSelective")
    int insertSelective(shop_design_auth record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @SelectProvider(type=shop_design_authSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mch_id", property="mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="parent_mch_id", property="parent_mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="auth_cs_id", property="auth_cs_id", jdbcType=JdbcType.INTEGER),
        @Result(column="auth_state", property="auth_state", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<shop_design_auth> selectByExample(shop_design_authExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @Select({
        "select",
        "mch_id, parent_mch_id, auth_cs_id, auth_state, remark, createTime, updateTime",
        "from shop_design_auth",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and parent_mch_id = #{parent_mch_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="mch_id", property="mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="parent_mch_id", property="parent_mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="auth_cs_id", property="auth_cs_id", jdbcType=JdbcType.INTEGER),
        @Result(column="auth_state", property="auth_state", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    shop_design_auth selectByPrimaryKey(shop_design_authKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @UpdateProvider(type=shop_design_authSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") shop_design_auth record, @Param("example") shop_design_authExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @UpdateProvider(type=shop_design_authSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") shop_design_auth record, @Param("example") shop_design_authExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @UpdateProvider(type=shop_design_authSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(shop_design_auth record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop_design_auth
     *
     * @mbggenerated Fri Sep 04 15:42:51 CST 2020
     */
    @Update({
        "update shop_design_auth",
        "set auth_cs_id = #{auth_cs_id,jdbcType=INTEGER},",
          "auth_state = #{auth_state,jdbcType=INTEGER},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and parent_mch_id = #{parent_mch_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(shop_design_auth record);
}